import axios from "@/utils/http";
enum Api {
  login = "/v1/user/login",
  register = "/v1/user/register",
  userInfo = "/v1/user/info",
}
export const login = <T>(parmas: any) => {
  return axios.post<T>(Api.login, parmas) as T;
};

export const register = <T>(parmas: any) => {
  return axios.post<T>(Api.register, parmas) as T;
};

export const  userInfo = <T>() => {
  return axios.get<T>(Api.userInfo) as T;
};
